package model;

public class RandomUtils {

	/**
	 * Returns a random number between "from" inclusive and "to" exclusive
	 * @param from
	 * @param to
	 * @return
	 */
	public static int getRandomNumber(int from, int to) {
		return (int) ((Math.random() * (to-from)) + from);
	}
	
	/**
	 * Returns a random boolean with 50% of probabilities of true or false 
	 * @return
	 */
	public static boolean getRandomBoolean() {
		return Math.random() <= 0.5;
	}
	
	public static void main(String[] args) {
		for(int i=0; i<100; i++){
			System.out.println(getRandomNumber(1, 10));
		}
	}
}
